<!DOCTYPE html>
<html lang="en">

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">

  <title>sc-type</title>

  <!-- Custom fonts for this template-->
  <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">

  <!-- Custom styles for this template-->
  <link href="css/sb-admin-2.min.css" rel="stylesheet">
  
    <!-- Custom styles for this page -->
  <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

  <script>(function(e,t,n){var r=e.querySelectorAll("html")[0];r.className=r.className.replace(/(^|\s)no-js(\s|$)/,"$1js$2")})(document,window,0);</script>
  
  <style>
  


/* Content */

.content {
	width: 100%;
	max-width: 800px;
	text-align: center;
	margin: 0 auto;
	padding: 0 0 3em 0;
}



.box {
	background-color: #a9dcf5d1;
	padding: 6.25rem 1.25rem;
}

.box + .box {
	margin-top: 2.5rem;
}



.js .inputfile {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

#file-5{
	display: none;
}


.inputfile + label {
    max-width: 80%;
    font-size: 1.25rem;
    /* 20px */
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    display: inline-block;
    overflow: hidden;
    padding: 0.625rem 1.25rem;
    /* 10px 20px */
}
.inputfile + label p {
    font-size: 1.25rem;
    font-weight: 350;
	display: inline-block;
}

.no-js .inputfile + label {
    display: none;
}

.inputfile:focus + label,
.inputfile.has-focus + label {
    outline: 1px dotted #000;
    outline: -webkit-focus-ring-color auto 5px;
}

.inputfile + label * {
    /* pointer-events: none; */
    /* in case of FastClick lib use */
}

.inputfile + label svg {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
    margin-top: -0.25em;
    /* 4px */
    margin-right: 0.25em;
    /* 4px */
}



/* style 4 */

.inputfile-4 + label {
    color: #4292c6;
}

.inputfile-4:focus + label,
.inputfile-4.has-focus + label,
.inputfile-4 + label:hover {
    color: #003366;
}

.inputfile-4 + label figure {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #4292c6;
    display: block;
    padding: 20px;
    margin: 0 auto 10px;
}

.inputfile-4:focus + label figure,
.inputfile-4.has-focus + label figure,
.inputfile-4 + label:hover figure {
    background-color: #003366;
}

.inputfile-4 + label svg {
    width: 100%;
    height: 100%;
    fill: #f1e5e6;
}


  </style>
  
  
</head>

<body id="page-top">

  <!-- Page Wrapper -->
  <div id="wrapper">

    <!-- Sidebar -->
    <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion toggled" id="accordionSidebar">

      <!-- Sidebar - Brand -->
      <a class="sidebar-brand d-flex align-items-center justify-content-center" href="#" >
          <img class="fas fa-laugh-wink" style="width:2rem!important; position: relative;" src="./logo.png" />
        <div class="sidebar-brand-text mx-3">sc-type</div>
      </a>

	  <!-- Nav Item - Dashboard -->
      <li class="nav-item">
        <a class="nav-link" href="index.html">
          <i class="fas fa-fw fa-tachometer-alt"></i>
          <span>Dashboard</span></a>
      </li>

	  
      <!-- Divider -->
      <hr class="sidebar-divider">

	  <!-- Heading -->
      <div class="sidebar-heading">
        Data processing
      </div>
	  
	  <!-- Nav Item - Dashboard -->
      <li class="nav-item active">
        <a class="nav-link" href="index.html">
          <i class="fas fa-fw fa-upload"></i>
          <span>Upload</span></a>
      </li>
	  
	  <!-- Nav Item - Dashboard -->
      <li class="nav-item">
        <a class="nav-link" href="qualitycontrol.html">
          <i class="fas fa-fw fa-check-double"></i>
          <span>Quality control</span></a>
      </li>
	  

	  <!-- Divider -->
      <hr class="sidebar-divider">
	  
      <!-- Heading -->
      <div class="sidebar-heading">
        Visualization
      </div>
	  
	  <!-- Nav Item - Dashboard -->
      <li class="nav-item">
        <a class="nav-link" href="results.html">
          <i class="fas fa-fw fa-chart-area"></i>
          <span>Scatterplot</span></a>
      </li>

	  <li class="nav-item">
        <a class="nav-link" href="results.html">
          <i class="fas fa-fw fa-table"></i>
          <span>Heatmap</span></a>
      </li>
	  
      <!-- Divider -->
      <hr class="sidebar-divider">

      <!-- Heading -->
      <div class="sidebar-heading">
        User
      </div>
	  
      <!-- Nav Item - Pages Collapse Menu -->
      <li class="nav-item">
        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" aria-expanded="true" aria-controls="collapsePages">
          <i class="fas fa-fw fa-list-ul"></i>
          <span>Examples</span>
        </a>
        <div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">
          <div class="bg-white py-2 collapse-inner rounded">
            <h6 class="collapse-header">Human:</h6>
            <a class="collapse-item" target="_blank" href="./livercellatlass/qualitycontrol.html">Liver cell atlas</a>
            <a class="collapse-item" target="_blank" href="./pbmc/qualitycontrol.html">PBMC (3k)</a>
          </div>
        </div>
      </li>

      <!-- Divider -->
      <hr class="sidebar-divider d-none d-md-block">

      <!-- Sidebar Toggler (Sidebar) -->
      <div class="text-center d-none d-md-inline">
        <button class="rounded-circle border-0" id="sidebarToggle"></button>
      </div>

    </ul>
    <!-- End of Sidebar -->

    <!-- Content Wrapper -->
    <div id="content-wrapper" class="d-flex flex-column">

      <!-- Main Content -->
      <div id="content">

        <!-- Topbar -->
        <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">


          <!-- Topbar Search -->
          <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
            <div class="input-group">
              <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
              <div class="input-group-append">
                <button class="btn btn-primary" type="button">
                  <i class="fas fa-search fa-sm"></i>
                </button>
              </div>
            </div>
          </form>

          <!-- Topbar Navbar -->
          <ul class="navbar-nav ml-auto">

            <!-- Nav Item - Search Dropdown (Visible Only XS) -->
            <li class="nav-item dropdown no-arrow d-sm-none">
              <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fas fa-search fa-fw"></i>
              </a>
              <!-- Dropdown - Messages -->
              <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">
                <form class="form-inline mr-auto w-100 navbar-search">
                  <div class="input-group">
                    <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                    <div class="input-group-append">
                      <button class="btn btn-primary" type="button">
                        <i class="fas fa-search fa-sm"></i>
                      </button>
                    </div>
                  </div>
                </form>
              </div>
            </li>

            <!-- Nav Item - Alerts -->
            <li class="nav-item dropdown no-arrow mx-1">
              <a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fas fa-bell fa-fw"></i>
                <!-- Counter - Alerts -->
                <span class="badge badge-danger badge-counter">1</span>
              </a>
              <!-- Dropdown - Alerts -->
              <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="alertsDropdown">
                <h6 class="dropdown-header">
                  Alerts Center
                </h6>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="mr-3">
                    <div class="icon-circle bg-primary">
                      <i class="fas fa-file-alt text-white"></i>
                    </div>
                  </div>
                  <div>
                    <div class="small text-gray-500">August 1, 2019</div>
                    <span class="font-weight-bold">Welcome to sc-type application! For more information read ...</span>
                  </div>
                </a>
               
          
                <a class="dropdown-item text-center small text-gray-500" href="#">Show All Alerts</a>
              </div>
            </li>


            <div class="topbar-divider d-none d-sm-block"></div>

            <!-- Nav Item - User Information -->
            <li class="nav-item dropdown no-arrow">
              <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small">Test user</span>
                <img class="img-profile rounded-circle" src="https://img.icons8.com/clouds/2x/user.png">
              </a>
              <!-- Dropdown - User Information -->
              <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                <a class="dropdown-item" href="#">
                  <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                  Profile
                </a>
                <a class="dropdown-item" href="#">
                  <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
                  Settings
                </a>
                <a class="dropdown-item" href="#">
                  <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
                  Activity Log
                </a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
                  <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                  Logout
                </a>
              </div>
            </li>

          </ul>

        </nav>
        <!-- End of Topbar -->

        <!-- Begin Page Content -->
        <div class="container-fluid">

          <!-- Page Heading -->
          <div class="d-sm-flex align-items-center justify-content-between mb-4">

          </div>

 

          <!-- Content Row -->

          <div class="row">

            <!-- Area Chart -->
            <div class="col-xl-9 col-lg-8">
              <div class="card shadow mb-4">
                <!-- Card Header - Dropdown -->
                <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                  <h6 class="m-0 font-weight-bold text-primary">Data upload</h6>
                  <div class="dropdown no-arrow">
                    <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                      <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
                      <div class="dropdown-header">Export options:</div>
                      <a class="dropdown-item" href="#" onclick="saveSvgAsPng(document.getElementById('clustid'), 'scatterplot.png', {scale: 7, backgroundColor:'white'});return false;">Export as *.png</a>
                      <a class="dropdown-item" style="cursor: not-allowed;" href="#">Export as *.svg</a>
					  <div class="dropdown-divider"></div>
					  <a class="dropdown-item" style="cursor: not-allowed;" href="#">Report an error</a>
                    </div>
                  </div>
                </div>
                <!-- Card Body -->
                <div class="card-body">
					<div class="container">

						<div class="content">

						
							<div class="box" id="boxinput">
								<input type="file" name="file-5[]" id="file-5" class="inputfile inputfile-4" multiple />
								<label id="labelforboxinp" for="file-5"><figure><svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17"><path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/></svg></figure> 
								<span>Choose a file&nbsp;<p>or drag it here.</p></span></label>
							</div>


						</div>

					</div><!-- /container -->
                </div>
              </div>
            </div>

            <!-- Pie Chart -->
            <div class="col-xl-3 col-lg-4">
			
			<div class="row">
			
					<div class="col-xl-12 col-lg-12">
					
					  <div class="card shadow mb-4">
						<!-- Card Header - Dropdown -->
						<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
						  <h6 class="m-0 font-weight-bold text-primary">Supported formats:</h6>
						  <div class="dropdown no-arrow">
							<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
							  <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
							</a>
							<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
							  <div class="dropdown-header">Export options:</div>
							  <a class="dropdown-item" href="#" style="cursor: not-allowed;">Export as *.png</a>
							  <a class="dropdown-item" href="#" style="cursor: not-allowed;">Export as *.svg</a>
							  <div class="dropdown-divider"></div>
							  <a class="dropdown-item" href="#" style="cursor: not-allowed;">Report an error</a>
							</div>
						  </div>
						</div>
						<!-- Card Body -->
						<div class="card-body">

							
							<div class="list-group">
  <a href="#" class="list-group-item list-group-item-action">
    <div class="d-flex w-100 justify-content-between" style="margin: 10px 0;">
      <h5 class="mb-1">Text file</h5>
      <small><span class="badge badge-secondary">Example data</span></small>
    </div>
    <p class="mb-1">Comma-separated text (TXT) or comma-separated values (CSV) files with a gene expression matrix.</p>
  </a>
  <a href="#" class="list-group-item list-group-item-action">
    <div class="d-flex w-100 justify-content-between" style="margin: 10px 0;">
      <h5 class="mb-1">SingleCellExperiment object</h5>
      <small><span class="badge badge-secondary">Example data</span></small>
    </div>
    <p class="mb-1">SingleCellExperiment R object with log-normalized single-cell sequencing data.</p>
	<small> For more information <b id="para">click here</b></small>
  </a>
  <a href="#" class="list-group-item list-group-item-action">
    <div class="d-flex w-100 justify-content-between" style="margin: 10px 0;">
      <h5 class="mb-1">10X Genomics</h5>
      <small><span class="badge badge-secondary">Example data</span></small>
    </div>
    <p class="mb-1">Output of the <b id="para2">cellranger</b> pipeline from 10X Genomics.</p>
	<small class="text-muted">The input data shpuld be zipped (compressed), see example data.</small>
  </a>
</div>
							

						</div>			
					  </div>			  
					</div> 			
					
					
			</div> 
			  
			  
			  
            </div>
          </div>
		  
		  
		  

        </div>
        <!-- /.container-fluid -->

      </div>
      <!-- End of Main Content -->

      <!-- Footer -->
      <footer class="sticky-footer bg-white">
        <div class="container my-auto">
          <div class="copyright text-center my-auto">
            <span>Copyright &copy; sctype.fimm.fi <span id="year">2019</span></span>
          </div>
        </div>
      </footer>
      <!-- End of Footer -->

    </div>
    <!-- End of Content Wrapper -->

  </div>
  <!-- End of Page Wrapper -->

  <!-- Scroll to Top Button-->
  <a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
  </a>

  <!-- Logout Modal-->
  <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
          <button class="close" type="button" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
          </button>
        </div>
        <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
        <div class="modal-footer">
          <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
          <a class="btn btn-primary" href="login.html">Logout</a>
        </div>
      </div>
    </div>
  </div>

  <!-- Bootstrap core JavaScript-->
  <script src="vendor/jquery/jquery.min.js"></script>
  <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

  <!-- Core plugin JavaScript-->
  <script src="vendor/jquery-easing/jquery.easing.min.js"></script>

  <!-- Custom scripts for all pages-->
  <script src="js/sb-admin-2.min.js"></script>

  <!-- Page level plugins -->
  <script src="vendor/chart.js/Chart.min.js"></script>

	<div id="tooltip" class="hidden">
        <p><span id="value"></p>
	</div>
</body>



<script>

var inputhtmlcp = $("#labelforboxinp").html();
$(".inputfile").each(function() {
var a = $(this), c = a.next("label"), e = c.html();   
a.on("change", function(a) {
	var file_ = $(".inputfile").prop('files')[0], form_data = new FormData();   
	form_data.append('file', file_); 
	$.ajax({
		url: 'upload.php', dataType: 'text', cache: false, contentType: false, processData: false, data: form_data, type: 'post',
		success: function(psr){
			if(psr=='true')
				(b=file_.name.split("\\").pop())?$("#labelforboxinp").find("span").html(b):$("#labelforboxinp").html(e);
			else{
				alert(psr); $("#labelforboxinp").html(inputhtmlcp);
			}
		}, 
		error: function(a){
			alert("Something wrong with an input file that can't be handled by our app. If you are not able to find an error please contact authors.");
		}
	});
});
a.on("focus", function(){a.addClass("has-focus")})
 .on("blur", function(){a.removeClass("has-focus")})
})
			
$("#boxinput").on("dragover",function(a){a.preventDefault();a.stopPropagation()});
$("#boxinput").on("dragenter",function(a){a.preventDefault();a.stopPropagation()});

$('#boxinput').on('drop',function(e){
	if(e.originalEvent.dataTransfer && e.originalEvent.dataTransfer.files.length) {
		e.preventDefault();e.stopPropagation();
		var file_=e.originalEvent.dataTransfer.files[0], form_data = new FormData();                  
		form_data.append('file', file_);                           
		$.ajax({
			url: 'upload.php', dataType: 'text', cache: false, contentType: false, processData: false, data: form_data, type: 'post',
			success: function(psr){
				if(psr=='true')
					(b=file_.name.split("\\").pop())?$("#labelforboxinp").find("span").html(b):$("#labelforboxinp").html(e);
				else{
					alert(psr); $("#labelforboxinp").html(inputhtmlcp);
				}
			}, 
			error: function(a){
				alert("Something wrong with an input file that can't be handled by our app. If you are not able to find an error please contact authors.");
			}
		 });
	}
});

	$(document).ready(function() {
	  document.getElementById("year").innerHTML = new Date().getFullYear();
	  document.getElementById("para").onclick = function () {        location.href = "https://bioconductor.org/packages/devel/bioc/vignettes/SingleCellExperiment/inst/doc/intro.html";    };
	  document.getElementById("para2").onclick = function () {        location.href = "https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger";    };
	});

		</script>

</html>
